//
//  ZKHelper.m
//  ZAKER
//
//  Created by yaohongchao on 17/2/18.
//  Copyright © 2017年 yaohongchao. All rights reserved.
//

#import "ZKHelper.h"
#import "ZKSwipeDetailModel.h"

@implementation ZKHelper
+(void)setImageWithQuality:(id)model
                 imageView:(UIImageView*)imageView{
    if([model isKindOfClass:[ZKSwipeDetailArticles class]]){
        ZKSwipeDetailArticles *article = (ZKSwipeDetailArticles*)model;
        [imageView sd_setImageWithURL:[NSURL URLWithString:article.thumbnail_mpic]];
    }
}

+(NSString*)getCachePath{
    NSArray *pathcaches=NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
    NSString* cacheDirectory  = [pathcaches objectAtIndex:0];
    return cacheDirectory;
}
@end
